import request from '@/utils/request'

// 查询火车票订单列表
export function listTrainorder(query) {
  return request({
    url: '/boot/trainorder/list',
    method: 'get',
    params: query
  })
}

// 查询火车票订单详细
export function getTrainorder(trainOrderId) {
  return request({
    url: '/boot/trainorder/' + trainOrderId,
    method: 'get'
  })
}

// 新增火车票订单
export function addTrainorder(data) {
  return request({
    url: '/boot/trainorder',
    method: 'post',
    data: data
  })
}

// 修改火车票订单
export function updateTrainorder(data) {
  return request({
    url: '/boot/trainorder',
    method: 'put',
    data: data
  })
}

// 删除火车票订单
export function delTrainorder(trainOrderId) {
  return request({
    url: '/boot/trainorder/' + trainOrderId,
    method: 'delete'
  })
}

// 获取火车票订单下拉选项列表
export function getTrainorderOptions() {
  return request({
    url: '/boot/trainorder/options',
    method: 'get'
  })
}
